commit baf1996eb3df021e471756f50f80c2d590828f7c
Author: q66 <q66@chimera-linux.org>
Date:   Wed Feb 8 18:39:33 2023 +0000

    fix out of bounds shift

diff --git a/src/efibootmgr.c b/src/efibootmgr.c
index b980bcd..f301b99 100644
--- a/src/efibootmgr.c
+++ b/src/efibootmgr.c
@@ -128,7 +128,7 @@ read_vars(char **namelist,
 			 * invalid to the linux kernel if we write it back so
 			 * lets zero it out if it is set since it would be
 			 * invalid to set it anyway */
-			entry->attributes = entry->attributes & ~(1 << 31);
+			entry->attributes = entry->attributes & ~(1U << 31);
 
 			entry->name = strdup(namelist[i]);
 			if (!entry->name) {
@@ -379,7 +379,7 @@ read_order(const char *name, var_entry_t **order)
 		/* latest apple firmware sets high bit which appears invalid
 		 * to the linux kernel if we write it back so lets zero it out
 		 * if it is set since it would be invalid to set it anyway */
-		bo->attributes = bo->attributes & ~(1 << 31);
+		bo->attributes = bo->attributes & ~(1U << 31);
 	}
 	return rc;
 }
@@ -863,7 +863,7 @@ construct_order(const char *name, char *order, int keep,
 	/* latest apple firmware sets high bit which appears invalid
 	 * to the linux kernel if we write it back so lets zero it out
 	 * if it is set since it would be invalid to set it anyway */
-	bo.attributes = bo.attributes & ~(1 << 31);
+	bo.attributes = bo.attributes & ~(1U << 31);
 
 	size_t new_data_size = data_size + bo.data_size;
 	uint16_t *new_data = calloc(1, new_data_size);
